Skip to content

feat: add more export options for kepler map export - #3348

Closed
bdjulbic wants to merge 5 commits into
keplergl:masterfrom
bdjulbic:feat/add-more-kepler-map-export-resultions
Closed

feat: add more export options for kepler map export#3348
bdjulbic wants to merge 5 commits into
keplergl:masterfrom
bdjulbic:feat/add-more-kepler-map-export-resultions

Conversation

@bdjulbic

@bdjulbic bdjulbic commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Add multiple resolution export for the Kepler map export functionality
and add a scale factor to the tooltip panel applied during export

Copilot AI review requested due to automatic review settings March 5, 2026 14:38
@bdjulbic
bdjulbic force-pushed the feat/add-more-kepler-map-export-resultions branch from 1891d62 to d2bd3ef Compare March 5, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds three new resolution export options (3x, 4x, 5x) to the kepler.gl map export feature. It also introduces a legend-scale remapping function so the legend doesn't scale as aggressively as the exported image when a high resolution is selected.

Changes:

  • New THREE_X, FOUR_X, and FIVE_X entries added to the RESOLUTIONS enum, with corresponding ImageResolutionOption constants and inclusion in EXPORT_IMG_RESOLUTION_OPTIONS
  • A new calculateLogarithmicLegendScale function that linearly remaps the export scale to a reduced legend scale, injected via a CSS custom property
  • A CSS rule in StyledPlotContainer that applies the remapped scale to the .map-control-panel element via the zoom property

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/constants/src/default-settings.ts Adds THREE_X, FOUR_X, FIVE_X to RESOLUTIONS enum and defines corresponding ImageResolutionOption objects, includes them in EXPORT_IMG_RESOLUTION_OPTIONS
src/components/src/plot-container.tsx Adds legend scale remapping function and applies it via a CSS custom property to prevent the legend from scaling as aggressively as the exported image

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/components/src/plot-container.tsx
Comment thread src/components/src/plot-container.tsx Outdated
Comment thread src/components/src/plot-container.tsx Outdated
@bdjulbic
bdjulbic force-pushed the feat/add-more-kepler-map-export-resultions branch from fe9c7f2 to f90eb09 Compare March 5, 2026 14:52
@igorDykhta

Copy link
Copy Markdown
Collaborator

@bdjulbic make sure we don't crash kepler.gl or our app.

The maximum width and height for a WebGL renderbuffer is a hardware-dependent limit that can be queried at runtime using the GL_MAX_RENDERBUFFER_SIZE parameter. This limit is guaranteed to be at least 2048 pixels in WebGL 2 and varies by device, commonly ranging from 4096 to 16384 pixels on modern hardware

bdjulbic and others added 4 commits March 5, 2026 16:34
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
Signed-off-by: bdjulbic <bdjulbic@foursquare.com>
@bdjulbic
bdjulbic force-pushed the feat/add-more-kepler-map-export-resultions branch from 19e3a70 to 16aa6d2 Compare March 5, 2026 15:34
@bdjulbic bdjulbic closed this Mar 14, 2026
@bdjulbic
bdjulbic deleted the feat/add-more-kepler-map-export-resultions branch March 14, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants